<?php
namespace app\superadmin\model;

use think\Model;

class Admin extends Model
{
	
	public function userinfo() {

        return $this->belongsTo('User','uid');

    }



    public function companyinfo() {

        return $this->belongsTo('Company','company_id');

    }

    public function permissionsinfo()
    {   
        
        return $this->belongsToMany('Directory', 'Permissions', 'directory_id', 'admin_id');
    }


    public function roleinfo() {

        return $this->belongsTo('Role','role_id');

    }

}